<?php echo $this->inlineScript()->appendFile($this->baseUrl('/js/aplication/texto/Texto.js')) ; ?>
<div id="confirmDelete"></div>
<div class="grid_12">

    <div class="bottom-spacing">
        <!-- Button -->
        <div class="float-right">
            <a href="<?php echo $this->url(array('controller' => 'Texto', 'action' => 'add'), null, true); ?>" class="button" >
                <span>Adicionar
                    <img src="<?php echo $this->baseUrl() ?>/images/icon/plus-small.gif" tppabs="<?php echo $this->baseUrl() ?>/images/plus-small.gif" width="12" height="9" alt="Adicionar" />
                </span>
            </a>
        </div>

        <!-- Table records filtering -->
        Filtro:
        <select class="input-short">
            <option value="1" selected="selected">Selecione</option>
            <option value="2">Evento</option>
        </select>

    </div>

    <!-- Example table -->
    <div class="module">
        <h2><span>Textos para flayer</span></h2>
        <div class="module-table-body">
            <form action="">
                <table id="myTable" class="tablesorter">
                    <thead>
                        <tr>
                             <th style="width:5%">#</th>
                             <th style="width:9%">ID</th>
                             <th style="width:20%">Rotulo</th>
                             <th style="width:21%">Titulo</th>
			                 <th style="width:15%">Foto</th>
			                 <th style="width:8%">Ativo</th>
                             <th style="width:25%"></th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php foreach ($this->texto as $item): ?>

                            <tr>
                                <td class="align-center">
                                    <input type="checkbox" id="id[]" name="id[]" value="<?php echo $this->escape($item->id) ?>" />
                                </td>
                                <td><a href=""><?php echo $item->id ?></a></td>
                                <td><?php echo $item->rotulo ?></td>
                                <td><?php echo $item->titulo ?></td>
				                <td align="center">
                                	<?php echo $this->img($this->baseUrl().'/upload/texto/'.$item->foto, 100, 100,'Imagem'); ?>
                                </td>
				                <td><?php echo $item->ativo ?></td>
                                <td>

                                    <a href="<?php echo $this->url(array('controller' => 'Texto', 'action' => 'show', 'id' => $item->id), null, true); ?>">
                                        <img src="<?php echo $this->baseUrl() ?>/images/icon/novo.gif" tppabs="<?php echo $this->baseUrl() ?>/images/icon/novo.gif" width="35" height="25" title="Show" alt="vizualizar" />
                                    </a>
                                    &ensp;
                                    <a href="<?php echo $this->url(array('controller' => 'Texto', 'action' => 'edit', 'id' => $item->id), null, true); ?>">
                                        <img src="<?php echo $this->baseUrl() ?>/images/icon/editar.gif" tppabs="<?php echo $this->baseUrl() ?>/images/icon/editar.gif" width="35" height="25" title="Editar" alt="Editar" />
                                    </a>
                                    &ensp;
                                    <a onclick="confirmDelete('confirmDelete',base_url+'Texto/delete/id/','<?php echo $item->titulo ;?>','<?php echo $item->id; ?>')" href="#">
                                        <img src="<?php echo $this->baseUrl() ?>/images/icon/deletar.gif" tppabs="<?php echo $this->baseUrl() ?>/images/icon/deletar.gif" width="35" height="25" title="Excluir" alt="Excluir" />
                                    </a>

                                </td>
                            </tr>
                        <?php endforeach; ?>
                        </tbody>
                    </table>
                </form>
            <?php echo $this->paginationControl($this->texto, 'Sliding', 'pagination.phtml'); ?>
        </div> <!-- End .grid_12 -->
        <div style="clear:both;"></div>
        <div style="clear:both;"></div>